public class Test3 {

    public static String arrtoString(int[] arr)
    {
        String str="[";
        for (int i = 0; i <arr.length; i++) {
            if(i<arr.length-1)
            {
                str=str+arr[i]+",";

            }
            else {
                str=str+arr[i];
            }

        }
        return str;
    }
    public static String reverse1(String str)
    {
        String s="";
        for (int i =str.length()-1; i >=0; i--) {
            s=s+str.charAt(i);


        }
        return s;
    }
    public static String reverse(String str)
    {
        String s="";
        for (int i = 0; i <str.length() ; i++) {
            char c=str.charAt(i);
            s=c+str;
        }
        return s;
    }
}
